﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucPostCrawlerGridView.ascx.cs" Inherits="WapCrawler.PostCrawler.ucControls.ucPostCrawlerGridView" %>
<script src="../../Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function CheckUnCheckAll(chkAll) {
        $('#<%=PostCrawlerGridView.ClientID %>').find("input:checkbox[name$=chkSelect]").each(function () {
            this.checked = chkAll.checked;
        });
    }
</script>
<!--<script src="../../Scripts/MyScript.js" type="text/javascript"></script>-->
<asp:GridView ID="PostCrawlerGridView" runat="server" AllowPaging="True" 
    AutoGenerateColumns="False" BackColor="White" BorderColor="#3366CC" 
    BorderStyle="None" BorderWidth="1px" CellPadding="4" 
    DataKeyNames="postCrawlerId" DataSourceID="PostCrawlerLinqDataSource" 
    onrowdatabound="PostCrawlerGridView_RowDataBound">
    <Columns>
        <asp:TemplateField HeaderText="Select" ItemStyle-HorizontalAlign="Center">
            <HeaderTemplate>
                <asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:CheckUnCheckAll(this);" />
            </HeaderTemplate>
            <ItemTemplate>
                <asp:CheckBox ID="chkSelect" runat="server" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField >
            <HeaderTemplate>
                Post
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Panel ID="PostPanel" runat="server" class="info" Style="padding-left: 0px!important">
                    <asp:HyperLink ID="postUrlHyperLink" NavigateUrl='<%#Eval("postUrl")%>' runat="server"
                        Style="float: left; padding-right: 4px">
                        <asp:Image ID="Image1" Width="53" Height="53" ImageUrl='<%#Eval("postThumbnailUrl")%>'
                            runat="server" />
                    </asp:HyperLink>
                    <h3>
                        <asp:HyperLink ID="postTitleHyperLink" NavigateUrl='<%#Eval("postUrl")%>' runat="server"
                            Text='<%#Eval("postTitle")%>'></asp:HyperLink>
                    </h3>
                    <span class="down">
                        <!--<a class="show-cat" href="http://gaupanda.hayday.mobi/game-offline/.html">-->
                        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                        <em>·</em><span>Lượt xem: 0000</span> </span>
                    <br />
                    <span class="desc">
                        <%#Eval("postHead")%></span>
                </asp:Panel>
                <div class="content">
                    <%#Eval("postContent")%>
                </div>
            </ItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:TemplateField>
    </Columns>
    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
    <PagerSettings Mode="NumericFirstLast" />
    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
    <RowStyle BackColor="White" ForeColor="#003399" />
    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
    <SortedAscendingCellStyle BackColor="#EDF6F6" />
    <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
    <SortedDescendingCellStyle BackColor="#D6DFDF" />
    <SortedDescendingHeaderStyle BackColor="#002876" />
</asp:GridView>
<asp:LinqDataSource ID="PostCrawlerLinqDataSource" runat="server" 
    ContextTypeName="WapCrawlerLib.WapDataClassesDataContext" EntityTypeName="" 
    TableName="PostCrawlers" onselecting="PostCrawlerLinqDataSource_Selecting">
</asp:LinqDataSource>

